/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ticketmaster.businesslogic;

import java.util.ArrayList;
import java.util.Collection;
import ticketmaster.businessobject.RewardBO;
import ticketmaster.dataobject.Reward;

/**
 *
 * @author xiaolong
 */
public class RewardController
{
    public static Collection<RewardBO> getRewardBO(Collection<Reward> rewards)
    {
        Collection<RewardBO> rewardBOs = new ArrayList<RewardBO>();
        for(Reward reward : rewards)
        {
            RewardBO rewardBO = new RewardBO();
            rewardBO.setName(reward.getName());
            rewardBO.setPoints(reward.getPoints());
            rewardBO.setPrice(reward.getPrice());
            rewardBO.setSelected(false);
            rewardBOs.add(rewardBO);
        }
        return rewardBOs;
    }
}
